<style>
.ncc-table-style tbody tr.item_disabled td {
	background: none repeat scroll 0 0 #F9F9F9;
	height: 30px;
	padding: 10px 0;
	text-align: center;
}
</style>
<div class="ncc-receipt-info" style="border-bottom: 0px;">
  <div class="ncc-receipt-info-title">
    <h3>商品清单</h3>
  </div>
  <table class="ncc-table-style" style="border: 1px solid #DCDCDC;border-collapse: inherit;">
    <thead>
      <tr style="background:#F7F8FA;">
        <th class="w20"></th>
          <th></th>
          <th>商品</th>
          <th class="w120">单价（元）</th>
          <th class="w120">数量</th>
          <th class="w120">小计（元）</th>
      </tr>
    </thead>
    <?php foreach($store_cart_list as $store_id => $cart_list) {?>
    <tbody>
      <tr>
        <th colspan="20" style="background: #CBE4F8;">
            <strong><a href="<?php echo url('index/store/index', array('store_id'=>$store_id));?>"><?php echo $cart_list[0]['store_name']; ?></a></strong> 
            <span member_id="<?php echo $store_list[$store_id]['member_id'];?>"></span>
          <div class="store-sale">
            <?php if (!empty($cancel_calc_sid_list[$store_id])) {?>
            <em><i class="icon-gift"></i>店铺活动-免运费</em><?php echo $cancel_calc_sid_list[$store_id]['desc'];?>
            <?php } ?>
            <?php if (!empty($store_mansong_rule_list[$store_id])) {?>
            <em><i class="icon-gift"></i>店铺活动-满即送</em><?php echo $store_mansong_rule_list[$store_id]['desc'];?>
            <?php if (is_array($store_premiums_list[$store_id])) {?>
            <?php foreach ($store_premiums_list[$store_id] as $goods_info) { ?>
            <a href="<?php echo url('index/goods/detail',array('goods_id'=>$goods_info['goods_id']));?>" target="_blank" class="ncc-store-gift" title="<?php echo $goods_info['goods_name']; ?>"><img src="<?php echo img_url($goods_info['goods_image'],60);?>" alt="<?php echo $goods_info['goods_name']; ?>" /></a>
            <?php } ?>
            <?php  } ?>
            <?php } ?>
          </div></th>
      </tr>
      <?php foreach($cart_list as $cart_info) {?>
      <tr id="cart_item_<?php echo $cart_info['cart_id'];?>" class="shop-list <?php echo ($cart_info['state'] && $cart_info['storage_state']) ? '' : 'item_disabled';?>">
        <td style="background: #FFF6F7;"><?php if ($cart_info['state'] && $cart_info['storage_state']) {?>
          <input type="hidden" value="<?php echo $cart_info['cart_id'].'|'.$cart_info['goods_num'];?>" name="cart_id[]">
          <?php } ?></td>
        <?php if ($cart_info['bl_id'] == '0') {?>
        <td style="background: #FFF6F7;" class="w60"><a href="<?php echo url('index/goods/detail',array('goods_id'=>$cart_info['goods_id']));?>" target="_blank" class="ncc-goods-thumb"><img src="<?php echo img_url($cart_info['goods_image'],60);?>" alt="<?php echo $cart_info['goods_name']; ?>" /></a></td>
        <?php } ?>
        <td style="background: #FFF6F7;" class="tl" <?php if ($cart_info['bl_id'] != '0') {?>colspan="2"<?php }?>><dl class="ncc-goods-info">
            <dt><a href="<?php echo url('index/goods/detail',array('goods_id'=>$cart_info['goods_id']));?>" target="_blank"><?php echo $cart_info['goods_name']; ?></a></dt>
            <?php if (!empty($cart_info['xianshi_info'])) {?>
            <dd> <span class="xianshi">满<strong><?php echo $cart_info['xianshi_info']['lower_limit'];?></strong>件，单价直降<em>￥<?php echo $cart_info['xianshi_info']['down_price']; ?></em></span> </dd>
            <?php }?>
            <?php if ($cart_info['ifgroupbuy']) {?>
            <dd> <span class="groupbuy">抢购</span></dd>
            <?php }?>
            <?php if ($cart_info['bl_id'] != '0') {?>
            <dd> <span class="buldling">优惠套装，单套直降<em>￥<?php echo $cart_info['down_price']; ?></em></span></dd>
            <?php }?>
            <?php if (!empty($cart_info['gift_list'])) { ?>
            <dd><span class="ncc-goods-gift">赠</span>
              <ul class="ncc-goods-gift-list">
                <?php foreach ($cart_info['gift_list'] as $goods_info) { ?>
                <li nc_group="<?php echo $cart_info['cart_id'];?>"><a href="<?php echo url('index/goods/detail',array('goods_id'=>$goods_info['gift_goodsid']));?>" target="_blank" class="thumb" title="赠品：<?php echo $goods_info['gift_goodsname']; ?> * <?php echo $goods_info['gift_amount'] * $cart_info['goods_num']; ?>"><img src="<?php echo img_url($goods_info['gift_goodsimage'],60);?>" alt="<?php echo $goods_info['gift_goodsname']; ?>"/></a> </li>
                <?php } ?>
              </ul>
            </dd>
            <?php  } ?>
          </dl></td>
        <td style="background: #FFF6F7;" class="w120"><em><?php echo $cart_info['goods_price']; ?></em></td>
        <td style="background: #FFF6F7;" class="w60"><?php echo $cart_info['state'] ? $cart_info['goods_num'] : ''; ?></td>
        <td style="background: #FFF6F7;" class="w120"><?php if ($cart_info['state'] && $cart_info['storage_state']) {?>
          <em id="item<?php echo $cart_info['cart_id']; ?>_subtotal" nc_type="eachGoodsTotal"><?php echo $cart_info['goods_total']; ?></em>
          <?php } elseif (!$cart_info['storage_state']) {?>
          <span style="color: #F00;">库存不足</span>
          <?php }elseif (!$cart_info['state']) {?>
          <span style="color: #F00;">已下架</span>
          <?php }?></td>
        <td style="background: #FFF6F7;"></td>
      </tr>

      <?php if (is_array($cart_info['bl_goods_list'])) {?>
      <?php foreach ($cart_info['bl_goods_list'] as $goods_info) { ?>
      <tr class="shop-list <?php echo $cart_info['state'] && $cart_info['storage_state'] ? '' : 'item_disabled';?>">
        <td></td>
        <td class="w60"><a href="<?php echo url('index/goods/detail',array('goods_id'=>$goods_info['goods_id']));?>" target="_blank" class="ncc-goods-thumb"><img src="<?php echo img_url($goods_info['goods_image'],60);?>" alt="<?php echo $goods_info['goods_name']; ?>" /></a></td>
        <td class="tl"><dl class="ncc-goods-info">
            <dt><a href="<?php echo url('index/goods/detail',array('goods_id'=>$goods_info['goods_id']));?>" target="_blank"><?php echo $goods_info['goods_name']; ?></a> </dt>
          </dl></td>
        <td><em><?php echo $goods_info['bl_goods_price'];?></em></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
      <?php } ?>
      <?php  } ?>

      <?php } ?>
      <tr>
        <td class="w10"></td>
        <td class="tl" colspan="2">买家留言：
          <textarea  name="pay_message[<?php echo $store_id;?>]" class="ncc-msg-textarea" placeholder="选填：对本次交易的说明（建议填写已经和商家达成一致的说明）" title="选填：对本次交易的说明（建议填写已经和商家达成一致的说明）"  maxlength="150"></textarea></td>
        <td class="tl" colspan="10"><div class="ncc-form-default"> </div></td>
      </tr>
      <tr>
        <td class="tr" colspan="20"><div style="margin-right: 40px;" class="ncc-store-account">
            <dl class="freight">
              <dt>运费：</dt>
              <dd><em id="eachStoreFreight_<?php echo $store_id;?>">0.00</em>元</dd>
            </dl>
            <dl>
              <dt>商品金额：</dt>
              <dd><em id="eachStoreGoodsTotal_<?php echo $store_id;?>"><?php echo $store_goods_total[$store_id];?></em>元</dd>
            </dl>
            <?php if (!empty($store_mansong_rule_list[$store_id]['discount'])) {?>
            <dl class="mansong">
              <dt>满即送-<?php echo $store_mansong_rule_list[$store_id]['desc'];?>：</dt>
              <dd><em id="eachStoreManSong_<?php echo $store_id;?>">-<?php echo $store_mansong_rule_list[$store_id]['discount'];?></em>元</dd>
            </dl>
            <?php } ?>


            <?php if (!empty($store_voucher_list[$store_id]) && is_array($store_voucher_list[$store_id])) {?>
            <dl class="voucher">
              <dt>
                <select nctype="voucher" name="voucher[<?php echo $store_id;?>]">
                  <option value="<?php echo $voucher['voucher_t_id'];?>|<?php echo $store_id;?>|0.00">选择代金券</option>
                  <?php foreach ($store_voucher_list[$store_id] as $voucher) {?>
                  <option value="<?php echo $voucher['voucher_t_id'];?>|<?php echo $store_id;?>|<?php echo $voucher['voucher_price'];?>"><?php echo $voucher['desc'];?></option>
                  <?php } ?>
                </select>：
              </dt>
              <dd><em id="eachStoreVoucher_<?php echo $store_id;?>">-0.00</em>元</dd>
            </dl>
            <?php } ?>


            <dl class="total">
              <dt>本店合计：</dt>
              <dd><em store_id="<?php echo $store_id;?>" nc_type="eachStoreTotal"></em>元</dd>
            </dl>
          </div></td>
      </tr>
      <?php }?>

      <?php if ($store_cart_list[key($store_cart_list)][0]['is_fcode'] == 1) { ?>
      <tr>
        <td class="tr" colspan="20"><div class="ncc-store-account"> 该商品需要F码才能购买，请输入您的F码：
            <input type="text" class="text w120" value="" name="fcode" id="fcode" maxlength="20">
          </div></td>
      </tr>
      <?php } ?>

    </tbody>
    <tfoot>
      <tr>
        <td colspan="20"><div class="ncc-all-account" style="font-weight: bold;font-size: 15px;margin-left: 20px;">订单总金额：<em id="orderTotal" style="font-weight: bold;font-size: 18px; margin-left: 35px;"></em><em class="fb" style="font-size: 18px;margin-right: 37px;">元</em></div></td>
      </tr>
    </tfoot>
  </table>
</div>
